As an external storage device that is used in a computer, a solid state drive (SSD) that uses a nonvolatile semiconductor memory, such as a NAND flash memory, as a storage medium has attracted attention. Since the SSD does not include a mechanical operation, the SSD is superior to a conventionally used magnetic disk device, in terms of shock resistance, a random read operation, and power consumption.
Meanwhile, a write speed of the NAND flash memory is lower than a write speed of the magnetic disk device. Thus, plural chips of the NAND flash memory in the SSD are connected to enable an access in parallel, and the NAND flash memory itself is configured to enable a simultaneous write operation in plural areas in the chips, so that transfer performance is improved.
In order to improve a practical data transfer speed of the SSD, making full use of the parallelism of hardware that is configured as described above is required. For this reason, a buffer memory that temporarily accumulates write data received from a host is prepared, the data is divided after the sufficient amount of data is accumulated in the buffer memory, and the data is written in the plural chips of the NAND flash memory in parallel.
The storage area of the NAND flash memory is divided into units called blocks, and a data erase operation with respect to the NAND flash memory is performed in a block unit. That is, the data write operation with respect to the NAND flash memory is performed by collectively erasing data in blocks and writing new data in corresponding blocks in a predetermined order.
Meanwhile, the NAND flash memory has a characteristic such that a maximum erase count is restricted. For example, if an erase count of an arbitrary block becomes equal to or more than a predetermined value, the block is exhausted and the probability of data storage failure increases. If the number of blocks where data cannot be stored due to the exhaustion increases, the entire data storage capacity of the SSD decreases and the SSD becomes failed when the predetermined declared capacity cannot be provided. In order to increase the lifespan of the SSD as a whole, a mechanism that equally uses all blocks and equalizes an erase count of each block is needed.
As described above, in order to practically use the SSD, it is needed to exploit parallelism at the time of an access, particularly, at the time of a write operation, to maintain transfer performance and equalize erase counts between the blocks. A block allocating method that selects a block where data is written is important for the securing parallelism at the time of writing data and the equalizing erase counts between the blocks.
For example, as in a hard disk, if a method that fixedly allocates a physical storage area to each address is applied to the SSD, a block is fixedly allocated to each address in the SSD. In this case, however, the following two problems are caused.
The first problem is caused when data written in a block corresponding to a specific address is repetitively overwritten. Because collective data erasing and writing are repeated in the block corresponding to the address, an erase count of only the corresponding block increases and the lifespan of the corresponding block becomes shorter than those of the other blocks.
The second problem is caused when plural write data is received for addresses allocated to one or more blocks at each of which parallel write is disabled. In this case, data is sequentially written in the individual blocks and transfer performance is deteriorated.